using System;
using System.Collections.Generic;
using System.Text;

namespace Fanfou.Entity
{
    /// <summary>
    /// A message/status of fanfou.com
    /// </summary>
    [Serializable]
    public class Message
    {
        private readonly string _title, _description, _id, _link;
        private readonly DateTime _pubDate;

        #region Properties

        /// <summary>
        /// The title of a message.
        /// </summary>
        public string Title
        {
            get { return _title; }
        }

        /// <summary>
        /// The description of a message. Now is the same of title.
        /// </summary>
        public string Description
        {
            get { return _description; }
        }

        /// <summary>
        /// The guid of a message.
        /// </summary>
        public string Id
        {
            get { return _id; }
        }

        /// <summary>
        /// The permalink of a message
        /// </summary>
        public string Link
        {
            get { return _link; }
        }

        /// <summary>
        /// The publis date and time of a message.
        /// </summary>
        public DateTime PubDate
        {
            get { return _pubDate; }
        }

        #endregion

        /// <summary>
        /// Create a message
        /// </summary>
        /// <param name="title">message title</param>
        /// <param name="description">message description</param>
        /// <param name="pubDate">created date time</param>
        /// <param name="id">guid of the message</param>
        /// <param name="link">message url</param>
        public Message(string title, string description, DateTime pubDate, string id, string link)
        {
            _title = title;
            _description = description;
            _pubDate = pubDate;
            _id = id;
            _link = link;
        }
    }
}
